package com.idealighter.game.games.sirenniuniu.dto;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;

@Data
public class GameInfo {
  @Protobuf(order = 1)
  private int stage; // 游戏阶段(0:准备阶段, 1:叫庄阶段, 2:下注阶段, 3:摊牌阶段)
  // 用户准备情况
  @Protobuf(order = 2)
  private List<ReadyItem> readyList = new ArrayList<ReadyItem>();
  // 用户叫庄情况
  @Protobuf(order = 3)
  private List<CallDealerItem> callDealerList = new ArrayList<CallDealerItem>();
  // 庄家
  @Protobuf(order = 4)
  private long dealer;
  // 用户下注情况
  @Protobuf(order = 5)
  private List<BetItem> betList = new ArrayList<BetItem>();
  // 我自己的牌
  @Protobuf(order = 6)
  private MySelfCard mySelfCard;
  // 其他已经摊牌的玩家牌
  // 用户摊牌情况（包括结算信息）
  @Protobuf(order = 8)
  private List<ShowCardItem> showCardList = new ArrayList<ShowCardItem>();
  //

  @Data
  public static class ReadyItem {
    @Protobuf(order = 1)
    private int order;
    @Protobuf(order = 2)
    private int ready;
  }

  @Data
  public static class BetItem {
    @Protobuf(order = 1)
    private int order;
    // 筹码
    @Protobuf(order = 2)
    private long chips;
  }

  @Data
  public static class CallDealerItem {
    @Protobuf(order = 1)
    private int order;
    // 筹码
    @Protobuf(order = 2)
    private int call;
  }

  @Data
  public static class MySelfCard {
    @Protobuf(order = 1)
    private int order;
    @Protobuf(order = 2)
    private int cardType;
    // 最优牌组合(如果有牛展示为3+2)
    @Protobuf(fieldType = FieldType.INT32, order = 4)
    private List<Integer> bestCards = new ArrayList<>();
  }

  @Data
  public static class ShowCardItem {
    @Protobuf(order = 1)
    private int order;
    // 是否摊牌(0:否,1:是)
    @Protobuf(order = 2)
    private int show;
    @Protobuf(order = 3)
    private int cardType;
    // 最优牌组合(如果有牛展示为3+2)
    @Protobuf(fieldType = FieldType.INT32, order = 4)
    private List<Integer> bestCards = new ArrayList<>();
  }
}
